package org.tea.inventory.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.tea.inventory.dao.tea.SupplierMessageMapper;
import org.tea.inventory.domain.tea.SupplierMessage;
import org.tea.inventory.model.vo.SupplierInfoVo;
import org.tea.inventory.service.ISupplierMessageService;

import java.util.List;

/**
 * 供应商信息Service业务层处理
 * 
 * @author dongxb
 * @date 2025-04-14
 */
@Service
public class SupplierMessageServiceImpl implements ISupplierMessageService
{
    @Autowired
    private SupplierMessageMapper supplierMessageMapper;

    /**
     * 查询供应商信息
     * 
     * @param id 供应商信息主键
     * @return 供应商信息
     */
    @Override
    public SupplierInfoVo selectSupplierMessageById(Long id)
    {
        return supplierMessageMapper.selectSupplierMessageById(id);
    }

    @Override
    public List<SupplierInfoVo> selectSupplierMessageList(SupplierInfoVo supplierInfoVo) {
        return supplierMessageMapper.selectSupplierMessageList(supplierInfoVo);
    }

    /**
     * 查询供应商信息列表
     *
     * @param supplierInfoVo 供应商信息
     * @return 供应商信息
     */


    /**
     * 新增供应商信息
     * 
     * @param supplierInfoVo 供应商信息
     * @return 结果
     */
    @Override
    public int insertSupplierMessage(SupplierInfoVo supplierInfoVo)
    {
        return supplierMessageMapper.insertSupplierMessage(supplierInfoVo);
    }

    /**
     * 修改供应商信息
     * 
     * @param supplierInfoVo 供应商信息
     * @return 结果
     */
    @Override
    public int updateSupplierMessage(SupplierInfoVo supplierInfoVo)
    {
        return supplierMessageMapper.updateSupplierMessage(supplierInfoVo);
    }

    /**
     * 批量删除供应商信息
     * 
     * @param ids 需要删除的供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplierMessageByIds(Long[] ids)
    {
        return supplierMessageMapper.deleteSupplierMessageByIds(ids);
    }

    /**
     * 删除供应商信息信息
     * 
     * @param id 供应商信息主键
     * @return 结果
     */
    @Override
    public int deleteSupplierMessageById(Long id)
    {
        return supplierMessageMapper.deleteSupplierMessageById(id);
    }
}
